<?php
define('_file_','add_cat');
if ( !isGod() )
	if ( !getRights($mod,'full') )
		if ( !News_getAccessFile(_file_) )
		{
			showMsg('Không có quyền truy cập vào trang này này !','ex','center');
			die();
		}
	
include('vsForm.php');
//############## init control ##########################
$txtCatName = new vsControl('txtCatName','textbox','Tên mục');
$txtCatName->charWidth = 70;
$txtCatName->maxChar = 70;
$txtCatName->ctrlStyle = 'font-family: Tahoma,verdana,arial; font-size: 11px; background-color: #CBDBEF';

$txtCatDesc = new vsControl('txtCatDesc','textarea','Mô tả');
$txtCatDesc->rows = 5;
$txtCatDesc->cols = 70;
$txtCatDesc->ctrlStyle = 'font-family: Tahoma,verdana,arial; font-size: 11px; background-color: #FFFFFF';

$btnOK = new vsControl('cmdOK','buttonsubmit','Thêm mới &raquo;');
//################ init form ######################
$frm = new vsForm('frmAddCat','admin.php?mod=' . $mod . '&act=add_cat');
$frm->title = 'Thêm mục mới';
$frm->titleHeight = 25;
$frm->arrItem = array($txtCatName,$txtCatDesc);
$frm->arrButton = array($btnOK);
//############## params for add action #####################
$frm->gcn = &$link;
$frm->tblName = 'category';
$frm->arrFields = array('cname','cdesc');
$frm->actionPrevRender('add','admin.php?mod=' . $mod);
//##########################################
$frm->frmRender();
?>